<template>
  <div class="riskManagement-root runningAnalysis-root">
    <div class="box">
     <riskType :riskTypeOptions="riskTypeOptions" :dateValueMap="dateValueMap" :dataSelectOptions="dataSelectOptions" />
    </div>
    <div class="box">
      <riskLevel :riskTypeOptions="riskTypeOptions" :dateValueMap="dateValueMap" :dataSelectOptions="dataSelectOptions"/>
    </div>
    <div class="box-100">
      <riskTrend :riskTypeOptions="riskTypeOptions" :dateValueMap="dateYearValueMap" :dataSelectOptions="dataYearSelectOptions" />
    </div>
  </div>
</template>

<script>
import riskLevel from './components/riskLevel.vue';
import riskTrend from './components/riskTrend.vue';
import riskType from './components/riskType.vue';
import { dateValueMap,dataSelectOptions,dateYearValueMap,dataYearSelectOptions } from '@/utils/global.js';
export default {
    name: "index",
    components: {
      riskTrend,riskType,riskLevel
    },
  data() {
    return {
      riskTypeOptions:[],
      dateValueMap:dateValueMap,
      dateYearValueMap:dateYearValueMap,
      dataSelectOptions:dataSelectOptions,
      dataYearSelectOptions:dataYearSelectOptions
    };
  },
  methods: {},
  created(){
    this.riskTypeOptions = []
    this.$commonJs.filterDataDict("hazardSClassify",this.riskTypeOptions)
    this.riskTypeOptions.splice(0,0,{label:"全部类型",value:"",name:""})
    this.riskTypeOptions.forEach(t=>{
      t.value = t.name
    })
  }
}
</script>

<style lang="scss" scoped>
  /*注意引入路径*/
  @import "../../../../runningAnalysis/runningAnalysis";
  .riskManagement-root {
    display: flex;
    flex-wrap: wrap;
    background-color: white;
  .box-100{
    width: 100%;
    padding: 8px 12px;
  }
  .box{
    width: 50%;
    padding: 8px 12px;
    margin-bottom: 20px;
  }
  }
</style>
